package com.managertrade.dto;
import com.managertrade.dao.mysql.entity.SysUser;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
@Data
@NoArgsConstructor
public class SysUserDTO {
    private Long id;
    private String username;
    private String password;
    private String nickname;
    private Integer status;
    private Date createTime;
    private Long roleId;
    private String roleName;
    // 构造方法或使用 MapStruct/BeanUtils 进行转换
    public SysUserDTO(SysUser user) {
        this.id = user.getId();
        this.username = user.getUsername();
        this.nickname = user.getNickname();
        this.status = user.getStatus();
    }

}
